/*
 * @Author: 张晨旭
 * @Date: 2021-04-21 15:55:45
 * @LastEditTime: 2021-04-23 19:15:18
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \riboa\daily-1807a-6\项目代码\project2\wipi\src\seivers\Archive.ts
 */

import {request} from "umi"
//文章列表 getList
export const getList = () =>{
    return request("/api/article",{method:"get"})
}
//顶部推荐
export const getHeaderList = () =>{
    return request('/api/article/all/recommend',{method:"get"})
}
//侧边栏推荐
// export const getLerList = (page=1,pageSize=28,status="publish") =>{
//     return request("/api/article/recommend",{method:"get",
//         params:{
//             page,pageSize,status
//         }
//     })
// }

//归档列表
export const getFile = () => {
    return request("/api/article/archives",{method:"get"})
}


export const getdetail = (id:string) => {
    return request(`/api/article/${id}/views`,{method:"POST"})
}